const Router = require('koa-router');
const userRouter = require('./modules/user');
const productRouter = require('./modules/product');

// const { apiVersion } = require('../config/index');

const router = new Router({
    // prefix: `/api/${apiVersion}`
});

// allowedMethods(): 处理405方法不匹配, 和501方法未实现
router.use(userRouter.routes(), userRouter.allowedMethods());
router.use(productRouter.routes(), productRouter.allowedMethods());

module.exports = router;